08/18/2022 - Windows: CMD format USB-Stick

Every now and then you run into an error when formatting or the device is not recognized (but in the device manager it is) or you want to erase a USB stick with a Linux distro...for all this I have found a simple solution under Windows.

08/18/2022 - Windows: CMD format USB-Stick

We all know this...some old distro on the USB stick and you need it quickly...but when I format it, there is only 10mb free????111!!!
To solve the problem quickly we need: Diskpart - don't be surprised - the pictures are in german but the commands are independent of the language as well as the result.

  1. Open CMD and type "diskpart"
  2. open_command_line
  3. Usually comes a prompt - confirm this
  4. Now we are in the actual tool that we want to use. To display all the disks we have to type: "list disk".
  5. show_all_disks
  6. In my example the USB stick is disk 3 and we have to select it now. We do this by means of: "select disk 3". A message should appear that the drive has been selected.
  7. select_disk
  8. By means of the command: "clean" we clean the USB stick and the existing data are deleted. Of course you can restore...but you should always select the CORRECT drive. Also here we get a confirmation: The data medium was cleaned.
  9. clean_disk
  10. Now we have to apply the command: "create partition primary" and again there is a confirmation: The specified partition has been created successfully.
  11. create_partition_primary
  12. Now we just need to go into Windows Explorer and format the USB stick.


If you have mastered this, then the whole process will take maybe a minute.

Errors that can occur and possible solutions:

  • CMD open as administrator
  • Test the USB-Stick on another port
  • Enter command again (sometimes it just hangs)